<!DOCTYPE html>
<html>

<head>
    <include file="Share:meta" />
</head>

<body class="hold-transition skin-blue sidebar-mini">
    <div class="wrapper">
        <include file="Share:header" />
        <include file="Share:left" />
        <!-- Content Wrapper. Contains page content -->
        <div class="content-wrapper">
            
            <section class="content">
                
                <div class="box box-info">
                    <div class="box-header with-border">
                        <h3 class="box-title"><a style="color:#333;" href="__APP__/console/project/p/{$Think.get.p}">文章列表</a></h3> - <h3 class="box-title">文章编辑</h3>
                        <h4 class="box-title" id="notice" style="margin-left:50px; color:#f00; display:none;"></h4>
                    </div>
                    <!-- /.box-header -->
                    <!-- form start -->
                    <form class="form-horizontal" method="post" action="" enctype="multipart/form-data">
                        <div class="box-body">
                        	<div class="form-group">
                                <label for="inputEmail3" class="col-sm-2 control-label">名称</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="name" placeholder="名称" value="{$result.name}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="inputEmail3" class="col-sm-2 control-label">封面</label>
                                <div class="col-sm-10">
                                	<notempty name="result.cover">
                                	<img src="{$result.new_cover}" width="150"/>
                                    </notempty>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="inputEmail3" class="col-sm-2 control-label"></label>
                                <div class="col-sm-10">
                                	<input type="file" class="form-control" name="cover">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="inputPassword3" class="col-sm-2 control-label">描述</label>
                                <div class="col-sm-10">
                                	<textarea class="form-control" rows="2" name="dep" placeholder="描述" style="resize:none;">{$result.dep}</textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="textarea" class="col-sm-2 control-label">星级</label>
                                <div class="col-sm-10">
                                    <select class="form-control" name="star" rel-star="{$result.star}">
                                        <option value="5">5星</option>
                                        <option value="4">4星</option>
                                        <option value="3">3星</option>
                                        <option value="2">2星</option>
                                        <option value="1">1星</option>
                                    </select>
                                </div>
                            </div>
							<div class="form-group">
                                <label for="inputEmail3" class="col-sm-2 control-label">价格</label>
                                <div class="col-sm-10">
                                    <input type="number" class="form-control" name="price" placeholder="价格" value="{$result.price}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="inputEmail3" class="col-sm-2 control-label">数量</label>
                                <div class="col-sm-10">
                                    <input type="number" class="form-control" name="num" placeholder="数量" value="{$result.num}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="inputEmail3" class="col-sm-2 control-label" title="越大越前">排序</label>
                                <div class="col-sm-10">
                                    <input type="number" class="form-control" name="myorder" placeholder="排序" value="{$result.myorder}">
                                </div>
                            </div>
                            <div class="form-group">
                            	<label for="textarea" class="col-sm-2 control-label">购买</label>
                                <div class="col-sm-10">
                                    <div class="checkbox" id="buy" rel-buy="{$result.buy}">
                                        <label style="padding-left:0;">
                                            <input type="radio" name="buy" value="1"> 可以 &nbsp;&nbsp;&nbsp;
                                        </label>
                                        <label>
                                            <input type="radio" name="buy" value="0"> 不可以 &nbsp;&nbsp;&nbsp;
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                            	<label for="textarea" class="col-sm-2 control-label">有效</label>
                                <div class="col-sm-10">
                                    <div class="checkbox" id="status" rel-status="{$result.status}">
                                        <label style="padding-left:0;">
                                            <input type="radio" name="status" value="1"> 是 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                        </label>
                                        <label>
                                            <input type="radio" name="status" value="0"> 否 &nbsp;&nbsp;&nbsp;
                                        </label>
                                    </div>
                                </div>
                            </div>
							                            
                            <div class="form-group">
                                <label for="textarea" class="col-sm-2 control-label">内容</label>
                                <div class="col-sm-10">
                                    <textarea class="form-control" rows="12" name="content" placeholder="内容" style="resize:none;">{$result.content}</textarea>
                                </div>
                            </div>
                            
                        </div>
                        <!-- /.box-body -->
                        <div class="box-footer">
                            <button type="submit" class="btn btn-primary" style="margin-left:173px;">编辑</button>
                        </div>
                        <!-- /.box-footer -->
                    </form>
                </div>
            </section>
            <!-- /.content -->
        </div>
        <!-- /.content-wrapper -->
        <include file="Share:copyright" />
        <include file="Share:setting" />
    </div>
    <include file="Share:js" />



<link rel="stylesheet" href="../Public/js/plugin/kindeditor/themes/default/default.css" />
<script charset="utf-8" src="../Public/js/plugin/kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="../Public/js/plugin/kindeditor/lang/zh_CN.js"></script>
<script type="text/javascript">
var editor;
KindEditor.ready(function(K) {
    editor = K.create('textarea[name="content"]', {
        resizeType : 1,
        items : [
            'fontsize', 'formatblock', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
            '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
            'insertunorderedlist', '|', 'table', '|', 'link', 'unlink', 'image', '|', 'source']
        
    });
});

$(function(){
	zhi1 = $("select[name=star]").attr("rel-star");
	$("select[name=star]").val(zhi1);
	zhi2 = $("#status").attr("rel-status");
	$("input[name=status][value="+zhi2+"]").attr("checked",true); 
	zhi3 = $("#buy").attr("rel-buy");
	$("input[name=buy][value="+zhi3+"]").attr("checked",true); 
})
</script>

</body>

</html>
